//结构体嵌套结构体
#include<iostream>
#include<string.h>

using namespace std;

struct Student
{
	string name;
	int age;
	int score;
};


struct Teacher
{
	int id;
	string name;
	int age;
	struct Student stu;
};
 
int main()
{
	Teacher t;
	t.id = 1;
	t.name = "刘汉烨";
	t.age = 40;
	t.stu.name = "王建平";
	t.stu.age = 19;
	t.stu.score = 59;
	cout << "老师工号: " << t.id << "老师姓名: " << t.name << " 老师年龄: " << t.age << endl;
	cout << "学生名字: " << t.stu.name << "学生年龄: " << t.stu.age << " 学生成绩: " << t.stu.score << endl;

	system("pause"); 
	return 0;
}
